//
//  BookTableViewCell.m
//  Qyer
//
//  Created by 赵宇 on 15/9/24.
//  Copyright (c) 2015年 赵宇. All rights reserved.
//

#import "BookTableViewCell.h"

@implementation BookTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLab = [[UILabel alloc]initWithFrame:CRM(20, 0, SCREEN_WIDTH-40, 0.1*SCREEN_HEIGHT)];
        self.titleLab.numberOfLines = 2;
        self.titleLab.font = [UIFont systemFontOfSize:15.];
        [self.contentView addSubview:self.titleLab];
        
        self.usernameLab = [[UILabel alloc]initWithFrame:CRM(20, 0.12*SCREEN_HEIGHT, 0.24*SCREEN_WIDTH, 0.037*SCREEN_HEIGHT)];
        self.usernameLab.textColor = [UIColor grayColor];
        self.usernameLab.font = [UIFont systemFontOfSize:13.];
        [self.contentView addSubview:self.usernameLab];
        
        self.viewLab = [[UILabel alloc]initWithFrame:CRM(0.4*SCREEN_WIDTH, 0.12*SCREEN_HEIGHT,0.32*SCREEN_WIDTH, 0.037*SCREEN_HEIGHT)];
        self.viewLab.textColor = [UIColor grayColor];
        self.viewLab.font = [UIFont systemFontOfSize:13.];
        [self.contentView addSubview:self.viewLab];
        
        self.replysLab = [[UILabel alloc]initWithFrame:CRM(0.74*SCREEN_WIDTH, 0.12*SCREEN_HEIGHT, 0.24*SCREEN_WIDTH, 0.037*SCREEN_HEIGHT)];
        self.replysLab.font = [UIFont systemFontOfSize:13.];
        self.replysLab.textColor = [UIColor grayColor];
        [self.contentView addSubview:self.replysLab];
        
        
        
    }
    return self;
}
-(void)setValueWithLookHotModel:(LookHotTravelModel *)mod
{
    self.titleLab.text = mod.title;
    self.usernameLab.text = mod.username;
    
   NSString *str = [NSString stringWithFormat:@"浏览量 %@",mod.views];
    self.viewLab.text = str;
    
    NSString *string = [NSString stringWithFormat:@"评论 %@",mod.replys];
    self.replysLab.text = string;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
